#define _CRT_SECURE_NO_WARNINGS 1
typedef struct TreeNode TN;
struct TreeNode* invertTree(struct TreeNode* root) {
    if (root == NULL)
        return NULL;

    TN* left = root->left;
    root->left = root->right;
    root->right = left;
    invertTree(root->left);
    invertTree(root->right);
    return root;
}